var o = getApp();

Page({
    data: {
        profitShow: !1,
        diyform: {
            form_id: "",
            diyform_data_id: "",
            pre_id: ""
        },
        networkLoading: !1
    },
    onLoad: function(o) {
        this.getData();
    },
    gotoSchoolCompanyNum: function() {
        wx.navigateTo({
            url: "/packageH/schoolCompany/schoolCompanyNum/schoolCompanyNum"
        });
    },
    traCheckedData: function(o) {
        var t = o.detail.diyform_data_id;
        console.log(o), t && (this.setProfitShow(), this.sendBtn(t));
    },
    sendBtn: function(t) {
        var a = this, n = {
            form_data_id: t,
            form_id: this.data.diyform.form_id
        }, i = o.getNetAddresss("plugin.school-company.api.dividend.save-form-data");
        o._getNetWork({
            url: i,
            data: n,
            success: function(o) {
                1 == o.data.result && a.setData({
                    "userInfo.income_amount": 0
                });
            }
        });
    },
    setProfitShow: function() {
        this.setData({
            profitShow: !this.data.profitShow
        });
    },
    onReady: function() {},
    getData: function() {
        var t = this, a = o.getNetAddresss("plugin.school-company.api.dividend.income");
        o._postNetWork({
            url: a,
            success: function(a) {
                var n = a.data;
                if (1 != n.result) return o.tips(n.msg);
                var i = n.data.form;
                t.setData({
                    userInfo: n.data,
                    "diyform.form_id": i.id,
                    networkLoading: !0
                });
            }
        });
    },
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});